package com.njtoyo.taxi.admin.rest.export.simple_call;

import com.alibaba.excel.converters.Converter;
import com.alibaba.excel.enums.CellDataTypeEnum;
import com.alibaba.excel.metadata.GlobalConfiguration;
import com.alibaba.excel.metadata.data.WriteCellData;
import com.alibaba.excel.metadata.property.ExcelContentProperty;
import com.njtoyo.taxi.admin.mapper.master.enums.SimpleCallRideOrderPaymentChannel;

public class SimpleCallRideOrderPaymentChannelConverter implements Converter<SimpleCallRideOrderPaymentChannel> {
    @Override
    public Class<?> supportJavaTypeKey() {
        return SimpleCallRideOrderPaymentChannel.class;
    }

    @Override
    public CellDataTypeEnum supportExcelTypeKey() {
        return CellDataTypeEnum.STRING;
    }

    @Override
    public WriteCellData<?> convertToExcelData(SimpleCallRideOrderPaymentChannel value, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) throws Exception {
        return new WriteCellData(value.getDesc());

    }
}
